package com.moxiao.yfjh.module.promotion.dal.dataobject.decorate;

import com.moxiao.yfjh.framework.common.enums.CommonStatusEnum;
import com.moxiao.yfjh.framework.mybatis.core.dataobject.BaseDO;
import com.moxiao.yfjh.module.promotion.enums.decorate.DecoratePageEnum;
import com.moxiao.yfjh.module.promotion.enums.decorate.DecorateComponentEnum;
import com.baomidou.mybatisplus.annotation.*;

import lombok.Data;

/**
 * 页面装修组件 DO, 一个页面由多个组件构成
 *
 * @author jason
 */
@TableName(value ="promotion_decorate_component")
@KeySequence("promotion_decorate_component_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
public class DecorateComponentDO extends BaseDO {

    /**
     * 编号
     */
    @TableId
    private Long id;

    /**
     * 所属页面 id
     *
     * 枚举 {@link DecoratePageEnum#getPage()}
     */
    private Integer page;

    /**
     * 组件编码
     * 枚举 {@link DecorateComponentEnum#getCode()}
     */
    private String code;

    /**
     * 组件值：json 格式。包含配置和数据
     */
    /** 原json
     * [
     *     {
     *       "name": "领优惠券",
     *       "picUrl": "https://api.java.crmeb.net/crmebimage/public/content/2023/01/11/2dfb64490f694d78a1ae9b0176884122arrur012nc.png",
     *       "url": "/pages/users/commission_rank/index"
     *     },
     *     {
     *       "name": "行业资讯",
     *       "picUrl": "https://static.iocoder.cn/mall/6a23b4be15894945b8908762cd6ac10ftxrly6psan.png",
     *       "url": "/pages/news_list/index"
     *     },
     *     {
     *       "name": "砍价列表",
     *       "picUrl": "https://static.iocoder.cn/mall/dd796e2a4f1e4be287b7e3f045b74513aa0fl2hbcv.png",
     *       "url": "/pages/activity/goods_bargain/index"
     *     },
     *     {
     *       "name": "分销中心",
     *       "picUrl": "https://static.iocoder.cn/mall/9217fff82f4e4cb2994b0a0350229bf8n5keuknzj4.png",
     *       "url": "/pages/news_list/index"
     *     },
     *     {
     *       "name": "限时秒杀",
     *       "picUrl": "https://static.iocoder.cn/mall/b2264d00e92e42118756cbeed35835c2u3d250a2ip.png",
     *       "url": "/pages/activity/goods_seckill/index"
     *     },
     *     {
     *       "name": "商品分类",
     *       "picUrl": "https://static.iocoder.cn/mall/4b6583ac95714bcab675e137717692054zxy59qiiy.png",
     *       "url": "/pages/goods_list/index?cid=0&title="
     *     },
     *     {
     *       "name": "签到",
     *       "picUrl": "https://static.iocoder.cn/mall/358787702d464984bcd8e3f6d937188337prsofmsp.png",
     *       "url": "/pages/users/user_sgin/index"
     *     },
     *     {
     *       "name": "拼团列表",
     *       "picUrl": "https://static.iocoder.cn/mall/3c1129aeef7f4ed2acc999a2f3c04770q1onmg3vp0.png",
     *       "url": "/pages/users/user_get_coupon/index"
     *     },
     *     {
     *       "name": "地址管理",
     *       "picUrl": "https://static.iocoder.cn/mall/04bde8bb2f2e4acaa7f961f7fa785d8880rv7z7pvt.png",
     *       "url": "/pages/users/user_address_list/index"
     *     },
     *     {
     *       "name": "优惠劵",
     *       "picUrl": "https://static.iocoder.cn/mall/76943158b9c44d64ab837ec9aa738d5cckxo88dutd.png",
     *       "url": "/pages/users/user_coupon/index"
     *     }
     *   ]
     */
    private String value;

    /**
     * 状态
     *
     * 枚举 {@link CommonStatusEnum}
     */
    private Integer status;

}
